import request from '@/utils/request'

// 查询房间树定义列表
export function listTree(query) {
  return request({
    url: '/houseTree/tree/list',
    method: 'get',
    params: query
  })
}

// 查询房间树定义详细
export function getTree(id) {
  return request({
    url: '/houseTree/tree/' + id,
    method: 'get'
  })
}

// 新增房间树定义
export function addTree(data) {
  return request({
    url: '/houseTree/tree',
    method: 'post',
    data: data
  })
}

// 修改房间树定义
export function updateTree(data) {
  return request({
    url: '/houseTree/tree',
    method: 'put',
    data: data
  })
}

// 删除房间数定义
export function delTreeById(id) {
  return request({
    url: '/houseTree/tree/byId/' + id,
    method: 'delete'
  })
}

// 批量删除房间树定义
export function delTree(ids) {
  return request({
    url: '/houseTree/tree/' + ids,
    method: 'delete'
  })
}
